﻿using ch02.binary.module;
using ch02.binary.type;

namespace ch02.binary.wasm_reader
{
    using MemType = Limits;

    public partial struct WasmReader
    {
        // mem sec
        private MemType[] ReadMemSec()
        {
            var vec = new MemType[ReadVarU32()];
            for (var i = 0; i < vec.Length; i++)
            {
                vec[i] = ReadLimits();
            }

            return vec;
        }
    }
}